/**
 * @Description: jdk5.0之前枚举类定义
 * @author: ten_fei
 * @date: 2021-03-04 19:40
 */
public class SeasonTest1 {

}


//自定义枚举类
class Season1 {
    //1.声明Season的私有化对象
    private final String seasonName;
    private final String seasonDesc;

    //2.私有化类构造器
    private Season1(String seasonName, String seasonDesc) {
        this.seasonName = seasonName;
        this.seasonDesc = seasonDesc;
    }

    //3.提供当前枚举类的多个对象
    public static final Season1 SPRING = new Season1("春天", "春暖花开");
    public static final Season1 SUMMER = new Season1("夏天", "夏日炎炎");
    public static final Season1 AUTUMN = new Season1("秋天", "秋高气爽");
    public static final Season1 WINTER = new Season1("冬天", "冰天雪地");

    //4.提供Get方法
    public String getSeasonName() {
        return seasonName;
    }

    public String getSeasonDesc() {
        return seasonDesc;
    }

    //5.提供toString方法

    @Override
    public String toString() {
        return "Season{" +
                "seasonName='" + seasonName + '\'' +
                ", seasonDesc='" + seasonDesc + '\'' +
                '}';
    }
}